Skip to content

Await provider.send in sender worker#577

Open
Dobrunia wants to merge 2 commits into
masterfrom
fix/sender-await-provider-send
Open

Await provider.send in sender worker#577
Dobrunia wants to merge 2 commits into
masterfrom
fix/sender-await-provider-send

Conversation

@Dobrunia

Copy link
Copy Markdown
Member

Summary

Await all provider.send() calls so RabbitMQ messages are acked only after delivery finishes, and send failures can be retried/stashed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the sender worker to await all provider.send() calls so that task completion (and downstream RabbitMQ acking) only occurs after notification delivery has finished, allowing send failures to propagate and be retried by the worker mechanism.

Changes:

  • Added await to previously fire-and-forget this.provider.send(...) calls in the sender worker task handlers.
  • Added a regression test ensuring handle() rejects when provider.send() rejects.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
workers/sender/src/index.ts Ensures task handlers await provider.send() so failures propagate and completion reflects actual delivery outcome.
workers/sender/tests/worker.test.ts Adds coverage that handle() rejects if provider.send() fails (verifies the new awaiting behavior).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants